package com.prs.crm.domain.oa;

import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

@Entity
@Table(name="oa_affiche")
public class Affiche extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String title;
	@Lob
	private String content;
	private String attach;
	@ManyToOne
	private Person person;   //发送人
	private Date creattime;
	private String type;     //类型：新闻、通知、公告
	private String state;   //状态：已读、未读。
	
	//OA系统需要的
	private String receive; //接收人
	private String degree;  //重要程度
	private String receipt;  //收到后给我一个回执
	private String comment;  //允许评论
	private String level;  //样式
	private Integer oabox;  //0表示草稿
	private String flow;  //流程
	
	@OneToMany(fetch=FetchType.LAZY,mappedBy="affiche")
	private Set<AfficheAccept> accepts;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getAttach() {
		return attach;
	}
	public void setAttach(String attach) {
		this.attach = attach;
	}
	public Person getPerson() {
		return person;
	}
	public void setPerson(Person person) {
		this.person = person;
	}
	public Date getCreattime() {
		return creattime;
	}
	public void setCreattime(Date creattime) {
		this.creattime = creattime;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getState() {
		return state;
	}
	public String getDegree() {
		return degree;
	}
	public void setDegree(String degree) {
		this.degree = degree;
	}
	public String getReceipt() {
		return receipt;
	}
	public void setReceipt(String receipt) {
		this.receipt = receipt;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getFlow() {
		return flow;
	}
	public void setFlow(String flow) {
		this.flow = flow;
	}
	public Set<AfficheAccept> getAccepts() {
		return accepts;
	}
	public void setAccepts(Set<AfficheAccept> accepts) {
		this.accepts = accepts;
	}
	public Integer getOabox() {
		return oabox;
	}
	public void setOabox(Integer oabox) {
		this.oabox = oabox;
	}
	public String getReceive() {
		return receive;
	}
	public void setReceive(String receive) {
		this.receive = receive;
	}
	
}
